<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/resource/img/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="/common.js"></script>
    <title>打印申请资料</title>
</head>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<c:forEach items="${map}" var="item" varStatus="go">
    <div class="print-page" style="page-break-after:always">
        <div class="print-header">
            <div class="print-logo">
                <img src="/platform/resource/img/logo.png" />
            </div>
        </div>
        <h2>
            <span>参加 ${item.key.insurancename} 申请书</span>
            <span>档案编号：${item.key.insuranceno}</span>
        </h2>
        <div class="print-content">
            <div class="print-insurance">
                <table>
                    <tbody>
                    <tr>
                        <th>业务类型</th>
                        <td colspan="3">
                            <c:choose>
                                <c:when test="${hzPolicy.pmode ==1}">
                                    单位入会
                                </c:when>
                                <c:when test="${hzPolicy.pmode ==2}">
                                    入会增补
                                </c:when>
                            </c:choose>
                        </td>
                    </tr>
                    <tr>
                        <th>单位名称</th>
                        <td>${hzPolicy.unitname}</td>
                        <th>经办人</th>
                        <td>${hzPolicy.contact}</td>
                    </tr>
                    <tr>
                        <th>单位地址</th>
                        <td>中国,${unit.address}</td>
                        <th>联系电话</th>
                        <td>${hzPolicy.mobile} ${hzPolicy.phone}</td>
                    </tr>
                    <tr>
                        <th>
                            会费标准
                        </th>
                        <td colspan="3">
                            每名会员份数： ${item.key.unitqty}份，每份 ${item.key.price} 元，合计 ${item.key.totalamount}。
                        </td>
                    </tr>
                    <tr>
                        <th>
                            告知内容
                        </th>
                        <td colspan="3">
                            我单位本次参加  在职职工医疗互助活动 的人员共 ${item.key.totalperson} 人，姓名、性别、身份证号、身体情况详见《${item.key.insurancename} 会员名单》。
                            上述内容在申请参加时均符合 在${item.key.insurancename} 的规定，所有参加会员已经正确理解相关实施细则。
                            如因《${item.key.insurancename} 会员名单》中所列事项有虚假或者隐瞒，从而导致在申请领取互助金时所产生的一切后果由我单位组织者负责。
                        </td>
                    </tr>
                    </tbody>
                </table>
                <div class="print-insurance-sign">
                    <p>申请单位领导：_____________ 　申请单位：_____________(盖章)</p>
                    <p>打印时间：${fns:formatDateTime(printDate)}</p>
                </div>
            </div>
        </div>
    </div>

    <div class="print-page" style="page-break-after:always">
        <div class="print-header">
            <div class="print-logo">
                <img src="/platform/resource/img/logo.png" />
            </div>
        </div>
        <h2>
            <span>参加 ${item.key.insurancename} 会员名单</span>
            <span>档案编号：${item.key.insuranceno}</span>
        </h2>
        <div class="print-content" style="">
            <div class="print-person">
                <table>
                    <tr>
                        <th>编号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>证件</th>
                        <th>年龄</th>
                    </tr>
                    <c:forEach items="${item.value}" var="i" varStatus="go">
                        <tr>
                            <td>${go.index+1}</td>
                            <td>${i.person.name}</td>
                            <td>
                                <c:choose>
                                    <c:when test="${i.person.sex == 1}">
                                        男
                                    </c:when>
                                    <c:when test="${i.person.sex == 2}">
                                        女
                                    </c:when>
                                    <c:otherwise>
                                        保密
                                    </c:otherwise>
                                </c:choose>
                            </td>
                            <td>${i.idCard} [${i.person.cardType==1?'身份证':'涉密编码'}]</td>
                            <td>${i.age}岁</td>
                        </tr>
                        <c:if test="${(go.index+1)%38==0 && !go.last}">
                </table>
                <div class="print-insurance-sign">
                    <p>共<fmt:formatNumber type="number" value="${item.value.size()/38+1}" maxFractionDigits="0"/>页/第<fmt:formatNumber type="number" value="${go.index/38}" maxFractionDigits="0"/>页，本页合计38人</p>
                </div>
            </div>
        </div>
    </div>

    <div class="print-page" style="page-break-after:always">
        <div class="print-content" style="padding-top:30px;">
            <div class="print-person">
                <table>
                    <tr>
                        <th>编号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>证件</th>
                        <th>年龄</th>
                    </tr>
                    </c:if>
                    <c:if test="${go.last}">
                </table>
                <div class="print-insurance-sign">
                    <p>共<fmt:formatNumber type="number" value="${item.value.size()/38+1}" maxFractionDigits="0"/>页/第<fmt:formatNumber type="number" value="${go.index/38+1}" maxFractionDigits="0"/>页，本页合计${(go.index+1)%38}人</p>
                </div>
                </c:if>
</c:forEach>
</div>
</div>
</c:forEach>

<script type="text/javascript">

    function remove_ie_header_and_footer() {
        var hkey_root, hkey_path, hkey_key;
        hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
        try {
            var RegWsh = new ActiveXObject("WScript.Shell");
            RegWsh.RegWrite(hkey_path + "header", "");
            RegWsh.RegWrite(hkey_path + "footer", "");
        } catch (e) { }
    }

    $(function () {
        try {
            if (!!window.ActiveXObject || "ActiveXObject" in window) {
                remove_ie_header_and_footer();
            }
        } catch (e) {

        }
        window.print();
        setTimeout(function () {
            layer.alert("资料打印完成", { closeBtn: false, title: "打印确认" }, function () {
                window.location.href = "/hzpolicy/hzPolicyFront/policyApplyDetails?id=${hzPolicy.id}";
            });
        },1000);

    });
</script>

</body>
</html>